Find specific files only in current directory...not sub directories AIX
Hi,
I have to find specific files only in the current directory...not in the sub directories.
But when I use Find command ... it searches all the files in the current directory as well as in the subdirectories. I am using AIX-UNIX machine.Please help..
I am using the below command. And i am able to list files only in the directory but not in sub-directories.
But I need to list only *.pdf and *.PDF file. Below command is not working. Please help.
Last edited by Franklin52; 11-29-2012 at 03:51 AM..
Reason: Please use code tags for data and code samples
################################################################
Copy this script to your path from where you want to search for all the files and directories in subdirectories recursively.
#################################################################
code starts here... (2 Replies)
Hello,
Using the instruction mget (within ftp) and with "Interactive mode off", I want to get all files from directory (DirAA), but not the files in sub-directories.
The files names don't follow any defined rule, so they can be just letters without (.) period
Directory structure example: ... (0 Replies)
Hello all,
I am having a hard type in figuring out how to only gather certain files in the current directory without exploring its subdirectories.
I tried:
find . -name "*.ksh" -prune
this also returns ksh files from lower subdirectories.
I also tried
find . -ls -name "*.ksh"
This also... (8 Replies)
Hello friends,
Plz suggest the find command,
How to search a string in a paticular string in miltiple files with current dirctory.:)
Thanks in advance.
Siva Ranganath Ch (2 Replies)
Hi,
I have to find files only in the current directory...not in the sub directories.
But when I use Find command ... it searches all the files in the current directory as well as in the subdirectories. I am using AIX-UNIX machine.Please help..I tried to use maxdepth..but it is not working in AIX. (2 Replies)
Can anyone come up with a unix command that lists
all the files, directories and sub-directories in the current directory
except a folder called log.?
Thank you in advance. (7 Replies)
Find all files in the current directory only excluding hidden directories and files.
For the below command, though it's not deleting hidden files.. it is traversing through the hidden directories and listing normal which should be avoided.
`find . \( ! -name ".*" -prune \) -mtime +${n_days}... (7 Replies)
hi,
i have a requirement to delete all the files from all the directories except some specific directories like archive and log.
for example:
there are following directories such as
A B C D Archive E Log F
which contains some sub directories and files. The requirement is to delete all the... (7 Replies)
What I know so far:
ls -A will list all files except those starting with a dot
ls -d will list all directories
ls -m will separate contents by commas
For getting crtimes use:
stat filename will give me the inode number
or
ls -i filename will give... (13 Replies)
Discussion started by: chstewar
13 Replies
LEARN ABOUT NETBSD
locate.conf
LOCATE.CONF(5) BSD File Formats Manual LOCATE.CONF(5)NAME
locate.conf -- locate database configuration file
DESCRIPTION
The locate.conf file specifies the behavior of locate.updatedb(8), which creates the locate(1) database.
The locate.conf file contains a list of newline separated records, each of which is composed of a keyword and arguments, which are separated
by white space. Arguments with embedded shell metacharacters must be quoted in sh(1) style. Lines beginning with ``#'' are treated as com-
ments and ignored. However, a ``#'' in the middle of a line does not start a comment.
The configuration options are as follows:
ignore pattern ...
Ignore files or directories. When building the database, do not descend into files or directories which match one of the specified
patterns. The matched files or directories are not stored to the database.
Default: Not specified.
ignorecontents pattern ...
Ignore contents of directories. When building the database, do not descend into files or directories which match one of the speci-
fied patterns. The matched files or directories themselves are stored to the database.
Default: Not specified.
ignorefs type ...
Ignore file system by type, adding type to the default list. When building the database, do not descend into file systems which are
of the specified type. The mount points are not stored to the database. If a ``!'' is prepended to type, the meaning is negated,
that is, ignore file systems which do not have the type. As a special case, if ``none'' is specified for type, the ignorefs list is
cleared and all file systems are traversed.
type is used as an argument to find(1)-fstype. The sysctl(8) command can be used to find out the types of file systems that are
available on the system:
sysctl vfs.generic.fstypes
Default: !local cd9660 fdesc kernfs procfs
searchpath directory ...
Specify base directories to be put in the database.
Default: /
workdir directory
Specify the working directory of locate.updatedb, in which a temporary file is placed. The temporary file is a list of all files,
and you should specify a directory that has enough space to hold it.
Default: /tmp
Refer to find(1) for the details of pattern (see -path expression) and type (see -fstype expression).
FILES
/etc/locate.conf The file locate.conf resides in /etc.
SEE ALSO find(1), locate(1), locate.updatedb(8), sysctl(8)HISTORY
The locate.conf file format first appeared in NetBSD 2.0.
AUTHORS
ITOH Yasufumi
BSD July 10, 2011 BSD