Sponsored Content
Top Forums UNIX for Dummies Questions & Answers finding files in unix and excluding certain folders Post 302555030 by alister on Tuesday 13th of September 2011 04:29:56 PM
Old 09-13-2011
To case-insensitively search under /repo for filenames matching *UAP* that are owned by john while not descending into any portion of the hiearchy under a .step directory:
Code:
find /repo \( -type f -user john -o -type d -name .step -prune \) -iname '*UAP*

The logic depends on the fact that a filename exactly matching .step cannot possibly match *UAP*. If this were not the case, another type -f could be added after -prune.

Regards,
Alister
 

10 More Discussions You Might Find Interesting

1. UNIX Desktop Questions & Answers

tar backup with excluding some folders

Hi , I want to backup the root file system but the size of / is very huge so I want to exclude some file systems.Man page of tar says X option excludes files but I could not do that.I use this command $ tar -cvf deneme.tar -X exc . $ cat exc sql kkm I think there... (2 Replies)
Discussion started by: kudret_gulcan
2 Replies

2. Filesystems, Disks and Memory

Sun UNIX Files & Folders listing

Hi guys, i'm new to UNIX and only know a small amout about it, but have just had some changes at work which now require me to interact with and work on SUN Unix systems often. I have reasonable knowledge of PC's but hope that you will be able to help me with these questions. Part1. I would like... (3 Replies)
Discussion started by: Scrat
3 Replies

3. HP-UX

to get the timestamp of files from the files and folders in Unix

Hi, I had a directory and many subdirectories and files with in it. Now i want to get the timestamp of files from the files and folders recursively. :( Please help me to generate a script fort he above mentioned requirement! Appreciate for ur qick response Thanks in advance! ... (2 Replies)
Discussion started by: kishan
2 Replies

4. Linux

Finding folders/files in an RPM file

Is there a way to find a specifc folder or filename in an RPM archive? I have dozens to go through and the hunt-and-peck method is too slow. (3 Replies)
Discussion started by: ricksj
3 Replies

5. UNIX for Dummies Questions & Answers

Delete folders and files in it - UNIX

I need to delete a folder and files in it of yesterdays and simply put this in cron. Folder name - "2010-03-2010" File name - "eprod_06_23.dmp" and "eprod_06_23.exp" Actually this folder and file is been created by a script which takes a backup of DB everyday.Thats why it creates folder and file... (3 Replies)
Discussion started by: j_panky
3 Replies

6. UNIX for Advanced & Expert Users

Copy Structure excluding some folders

Hi I want to copy the structure from one place to another. -> cd /hol/; -> find . -type d | cpio -pvdm /abc/cat; while copying the structure I want to exclude some directories like test1 and Test. I have read somewhere that this can be done with -prune option. Could anyone... (2 Replies)
Discussion started by: soumodeep123
2 Replies

7. Shell Programming and Scripting

Help to move folders, subfolders and files from unix to windows

Hi Unix Gurus, I am able to copy only files that exist in the parent folder. My parent folder has sub folders and within sub folders there are lots files. I need to copy folder, sub folders and files from Unix to the remote windows SFTP location. The directory structure is something like... (1 Reply)
Discussion started by: shankar1dada
1 Replies

8. UNIX for Dummies Questions & Answers

Finding new file, but excluding directory..

hi, I need to find files that have been created less than 3 days ago. However, I need to only search specific directories. I've searched about the net and found some useful commands such as : find . -type d -name 'dir_to_exclude' -prune -o -print -mtime -3 however I cannot get it... (2 Replies)
Discussion started by: horhif
2 Replies

9. UNIX for Advanced & Expert Users

Copying excluding some files and folders

I have a main folder. Inside that i have many(50) subfolders. In each subfolder, there are a no of large files(500 files ) present. I want to do copy operation for some files from some of the subfolders to /usr/tmp. I have the list of the subfolders and list of of files which i dont want to... (4 Replies)
Discussion started by: millan
4 Replies

10. Shell Programming and Scripting

Finding duplicates in a file excluding specific pattern

I have unix file like below >newuser newuser <hello hello newone I want to find the unique values in the file(excluding <,>),so that the out put should be >newuser <hello newone can any body tell me what is command to get this new file. (7 Replies)
Discussion started by: shiva2985
7 Replies
Dist::Zilla::Plugin::PruneFiles(3pm)			User Contributed Perl Documentation		      Dist::Zilla::Plugin::PruneFiles(3pm)

NAME
Dist::Zilla::Plugin::PruneFiles - prune arbirary files from the dist VERSION
version 4.300020 SYNOPSIS
This plugin allows you to explicitly prune some files from your distribution. You can either specify the exact set of files (with the "filenames" parameter) or provide the regular expressions to check (using "match"). This is useful if another plugin (maybe a FileGatherer) adds a bunch of files, and you only want a subset of them. In your dist.ini: [PruneFiles] filename = xt/release/pod-coverage.t ; pod coverage tests are for jerks filename = todo-list.txt ; keep our secret plans to ourselves match = ^test_data/* match = ^test.cvs$ ATTRIBUTES
filenames This is an arrayref of filenames to be pruned from the distribution. matches This is an arrayref of regular expressions and files matching any of them, will be pruned from the distribution. SEE ALSO
Dist::Zilla plugins: PruneCruft, GatherDir, ManifestSkip. AUTHOR
Ricardo SIGNES <rjbs@cpan.org> COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Ricardo SIGNES. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2012-06-21 Dist::Zilla::Plugin::PruneFiles(3pm)
All times are GMT -4. The time now is 09:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy