Ignoring package contents with find

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Ignoring package contents with find
# 1  
Old 09-02-2009
Ignoring package contents with find

Hi everyone,

I use the command find to get all folder contents of a folder. The problem is, it also gives files from within other files with package contents. (.app, .rtfd, ...). Is there anyway to not do that ?

find /path/to/my/folder/ ! -name '.*'"

(I'm using OS X, I don't know if other OSes see package contents too)

One possible option: Well I'm not 100% sure it's possible but what about only searching through folders with a maxdepth of 1 ? So all files get found and if it's a folder, search it till maxdepth 1 and if it includes a folder do it again etc. ?

Thanks in advance

Last edited by JamesGreen; 09-02-2009 at 11:16 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need find package that supports printf on AIX

My current find command does not support printf. I need find package that supports printf on AiX 6.1 system. Can anyone help me with the download link or where / how / if I can find it ? Can it be installed at a different non default location so that it can be reference without... (5 Replies)
Discussion started by: mohtashims
5 Replies

2. UNIX for Beginners Questions & Answers

Unable to find package

Hi there. I'm putting together a small cluster of Raspberry pis running Raspbian. They've all been setup identically from the same sd image. They all update and install perfectly except one node which refuses to install anything. It has exactly the same login, network, user details etc,... (3 Replies)
Discussion started by: MuntyScrunt
3 Replies

3. AIX

AIX : Find files ignoring certain file extensions

Hi All, I am scripting a program to find and archive files. There are certain file types that I do not want to archive. Below is the scenario. I have created a lookup file which has details on folders days and file extensions that needs to be ignored I have separated the individual into... (4 Replies)
Discussion started by: kavinmjr
4 Replies

4. SCO

Using FIND but ignoring selected folders

This may be ludicrously easy to most people, but I've been scratching my head today trying to do it. I'm archiving data on a OpenServer 5.0.6a box using a combination of FIND, CPIO and BZIP2. What I'd like to do is archive a range of folders, but ignore some. For instance, if I have 5... (1 Reply)
Discussion started by: mmcardle
1 Replies

5. UNIX for Dummies Questions & Answers

Find files associated with a package using Ubuntu

Stupid question of the day. How can I find a file that is associated with a package installed on my Ubuntu 12.04 desktop. More clarification, so if I: lsof -p 11399 java 11399 davider mem REG 8,6 438211 265067 /usr/lib/java/jre1.7.0_07/lib/i386/libt2k.so How can I... (4 Replies)
Discussion started by: metallica1973
4 Replies

6. OS X (Apple)

Where are package contents stored for a file, or why aren't they visible w/o right clicking the file

I was wondering about the "Show Package Contents" option in OS X. I have a keynote file that I'm looking at. Exactly where are these contents or its directory stored, because they aren't visible in the Finder window, unless I obviously right click and choose to view them. And I don't think I can... (2 Replies)
Discussion started by: Straitsfan
2 Replies

7. UNIX for Advanced & Expert Users

How to find dependancies of .dstream package (Solaris) & .rpm package( linux)

Friends, Please let meknow, How we can find the dependancies of .dstream package & .rpm package before installation ? For AIX, We can use the inutoc . command to create the .toc file for the bff package, What about Solaris & Linux ? (0 Replies)
Discussion started by: yb4779
0 Replies

8. Solaris

how to find the package name, if I knwo the path

how to find the package name, if I knwo the path in solaris. for an example /usr/xxx Can you please advise? (2 Replies)
Discussion started by: mokkan
2 Replies

9. Shell Programming and Scripting

Find files ignoring subdirectories

Hi guys, I am searching some files not equal to the pattern with this command find ! -name "PATTERN" -type f but my problem is the find command because he also search inside subdirectories and that's the thing i don't want that. Is there any comand to ignore the directories... (4 Replies)
Discussion started by: osramos
4 Replies

10. UNIX for Dummies Questions & Answers

apt-get is unabel to find the package

Hi All, I am getting the following error when installing teh package kernel-source-2.6.10 ba-chroot:~# apt-get install kernel-source-2.6.10 Reading Package Lists... Done Building Dependency Tree... Done E: Couldn't find package kernel-source-2.6.10 thanks & Regards Gauri (4 Replies)
Discussion started by: gauri
4 Replies
Login or Register to Ask a Question
RMF(1)								     [nmh-1.5]								    RMF(1)

rmf - remove an nmh folder SYNOPSIS
rmf [+folder] [-interactive | -nointeractive] [-version] [-help] DESCRIPTION
Rmf removes all of the messages (files) within the specified (or default) folder, and then removes the folder (directory) itself. If there are any files within the folder which are not a part of nmh, they will not be removed, and an error will be produced. If the folder is given explicitly or the -nointeractive option is given, then the folder will be removed without confirmation. Otherwise, the user will be asked for confirmation. If rmf can't find the current folder, for some reason, the folder to be removed defaults to `+inbox' (unless overridden by user's profile entry "Inbox") with confirmation. If the folder being removed is a subfolder, the parent folder will become the new current folder, and rmf will produce a message telling the user this has happened. This provides an easy mechanism for selecting a set of messages, operating on the list, then removing the list and returning to the current folder from which the list was extracted. If rmf s used on a read-only folder, it will delete all the (private) sequences (i.e., "atr-seq-folder" entries) for this folder from your context without affecting the folder itself. Rmf irreversibly deletes messages that don't have other links, so use it with caution. FILES
$HOME/.mh_profile The user profile PROFILE COMPONENTS
Path: To determine the user's nmh directory Current-Folder: To find the default current folder Inbox: To find the default inbox SEE ALSO
`+folder' defaults to the current folder, usually with confirmation `-interactive' if +folder' not given, `-nointeractive' otherwise CONTEXT
Rmf will set the current folder to the parent folder if a subfolder is removed; or if the current folder is removed, it will make "inbox" current. Otherwise, it doesn't change the current folder or message. BUGS
Although intuitively one would suspect that rmf works recursively, it does not. Hence if you have a sub-folder within a folder, in order to rmf the parent, you must first rmf each of the children. MH.6.8 11 June 2012 RMF(1)