11-28-2007
Hi.
Check your man find page to see if it accepts -maxdepth 1 -- that would do what you want in GNU/Linux and FreeBSD ... cheers, drl
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
By default FIND command searches for matching files in all the subdirectories within the specified path.
Is there a way to restrict FIND command's search path to only the specified directory and NOT TO scan its subdirectories.
Any help would be more than appreciated.
Thanks and Regards (2 Replies)
Discussion started by: super_duper_guy
2 Replies
2. Shell Programming and Scripting
Hi,
Am trying for a script which should delete more than 15 days older files in my current directory.Am using the below piece of code:
"find /tmp -type f -name "pattern" -mtime +15 -exec /usr/bin/ls -altr {} \;"
"find /tmp -type f -name "pattern" -mtime +15 -exec /usr/bin/rm -f {} \;"
... (9 Replies)
Discussion started by: puppala
9 Replies
3. UNIX for Dummies Questions & Answers
specifically - I don't need to restrict a user to a single directory - but I want them to be "ROOTED" to their home directory.
so if my home directory is /home/onlyme
when I login - if I do a pwd - I want to see:
/
but in real life I will be in /home/onlyme - it just appears as root to... (10 Replies)
Discussion started by: itobenon
10 Replies
4. Shell Programming and Scripting
Hi All
I was wondering what is the most efficient way to find files in the current directory(that may contain 100,000's files), that meets a certain specified file type and of a certain age.
I have experimented with the find command in unix but it also searches all sub directories. I have... (2 Replies)
Discussion started by: kewong007
2 Replies
5. Red Hat
Hi
I have a Fedora10 server and i need a particular user to view files only in a particular folder.
All other files in other folders having "read" permission for all shouldn't be accessible to this user.
Please let me know if ther's a way.
Thanks,
HG (5 Replies)
Discussion started by: Hari_Ganesh
5 Replies
6. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Write a C program to search the current directory for all pipes.
1. It will print the pipe... (2 Replies)
Discussion started by: natwickley
2 Replies
7. UNIX for Dummies Questions & Answers
Hi All,
I am trying to delete file (with a mtime older than 2 days) from the current directory ONLY using:
find . -daystart -maxdepth 1 -mtime 2 -exec rm {} \;
but this doesn't seem to work it is still find files in subdirectories which I don't want to delete.
Please can anyone offer... (2 Replies)
Discussion started by: daveu7
2 Replies
8. Shell Programming and Scripting
hello, all
I have googled internet, read the man page of Find, searched this forum, but still could not figure out how.
My current directory is:
little@wenwen:~$ pwd
/home/little
little@wenwen:~$
I want to use find command to list the files in my current directory, how should i write... (3 Replies)
Discussion started by: littlewenwen
3 Replies
9. Shell Programming and Scripting
Hello.
I want to find a line that has "new = 0" in it, then search back based on field $4 () in the current line, and find the first line that has field $4 and "last fetch"
Grep or Awk preferred.
Here is what the data looks like:
2013-12-12 12:10:30,117 TRACE last fetch: Thu Dec 12... (7 Replies)
Discussion started by: JimBurns
7 Replies
10. AIX
hi,
I want to restrict some user access to only 1 directory (including all sub-directories/files in it).
can you please explain me, how can we do this?
example;
Filesystem GB blocks Used Free %Used Mounted on
/dev/hd4 2.61 1.02 1.59 40% /
/dev/hd2 ... (7 Replies)
Discussion started by: aaron8667
7 Replies
LEARN ABOUT OPENSOLARIS
gnome-search-tool
gnome-search-tool(1) User Commands gnome-search-tool(1)
NAME
gnome-search-tool - search for files
SYNOPSIS
gnome-search-tool [--named=text] [--path=folder] [--sortby=order] [--descending] [--contains=string] [--user=user] [--nouser] [--allmounts]
[--empty] [--follow] [--group=group] [--hidden] [--mtimeless=date] [--mtimemore=date] [--notnamed=filename] [--regex=pattern] [--size-
less=size] [--sizemore=size] [--start] [gnome-std-options]
DESCRIPTION
The Search for Files application enables you to search for files on your system. Search for Files uses the find(1) command.
OPTIONS
The following options are supported:
--allmounts Select the 'Search other filesystems' search constraint.
--contains=string Select the 'Contains the text' search constraint and set the text of that entry. Use a full filename or a partial
filename with wildcards. See find(1) for more details about using wildcards.
--descending Set sort order to descending. The default sort order is ascending.
--empty Select the 'File is empty' search constraint.
--follow Select the 'Follow symbolic links' search constraint.
--group=group Select the 'Owned by group' search constraint and set the text of that entry.
--hidden Select the 'Show hidden and backup files' search option.
--mtimeless=date Select the 'Date modified before (days)' search constraint and set the text of that entry.
--mtimemore=date Select the 'Date modified after (days)' search constraint and set the text of that entry.
--named=text Set the text of the 'Name contains' search option.
--notnamed=filename Select the 'File is not named' search constraint and set the text of that entry. Use a full filename or a partial
filename with wildcards. See find(1) for more details about using wildcards.
--nouser Select the 'Owner is unrecognized' search constraint.
--path=folder Set the text of the 'Look in folder' entry. Defaults to the current working directory.
--start Automatically start a search.
--regex=pattern Select the 'File matches regular expression' search constraint and set the text of that entry. See find(1) for more
details about the regular expression patterns that can be used.
--sizeless=size Select the 'Size is less than (kilobytes)' search constraint and set the text of that entry.
--sizemore=size Select the 'Size is more than (kilobytes)' search constraint and set the text of that entry.
--sortby=order Sort files by one of the following: name, folder, size, type, or date.
--user=user Select the 'Owned by user' search constraint and set the text of that entry.
gnome-std-options Standard options available for use with most GNOME applications. See gnome-std-options(5) for more information.
EXAMPLES
Example 1: Performing a basic search automatically
example% gnome-search-tool --name=a.out --path=$HOME --autostart
Example 2: Performing an advanced search automatically
example% gnome-search-tool --contains=unistd.h --mtimeless=3 --sortby=size --autostart
EXIT STATUS
The following exit values are returned:
0 Application exited successfully
>0 Application exited with failure
FILES
The following files are used by this application:
/usr/bin/gnome-search-tool Executable for Search for Files
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWgnome-search-tool |
+-----------------------------+-----------------------------+
|Interface stability |Volatile |
+-----------------------------+-----------------------------+
SEE ALSO
Search for Files Manual
Latest version of the GNOME Desktop User Guide for your platform.
find(1), gnome-std-options(5)
NOTES
Written by Glynn Foster, Sun Microsystems Inc., 2003, 2006.
SunOS 5.11 2 Oct 2003 gnome-search-tool(1)