10-31-2008
My question is all driven by this:
I am interested in files in my current directory, such files have either a ksh extension or no extension at all.
I want to gather these files through a one line command and follow this with a grep to go through this list and produce a second list of the ones which have a particular string in them
Final result I found my search string in either ksh files or no extension files.
Can you help?
Thanks.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I am trying to use the find command to find files in the current directory that meet a certain date criteria.
find . -type -f -mtime +2
However, the above also checks the directories below.
I tried -prune, but that seems to ignore this directory completely.
I read about using -path w/... (5 Replies)
Discussion started by: jliebling
5 Replies
2. UNIX for Dummies Questions & Answers
Using Solaris 8, I've forgotten how to exclude the current directory in the find results.
find . -type d ! -name "*.CAP"
I want every directory that does not match the *.CAP pattern, except the current directory. (2 Replies)
Discussion started by: dangral
2 Replies
3. Shell Programming and Scripting
i want to compile a list of files in all sub directories but exclude the current directory.
the closest i could get was to search 'only' the current directory, which is the opposite of what i wanted.
find . ! -name . -prune (7 Replies)
Discussion started by: mjays
7 Replies
4. UNIX for Dummies Questions & Answers
Hello,
I just want to ask the following use of find command:
1. how can I find files only to the current directory?
2. how can I find files to directories and all subdiretories (are this include soft links?) but will not go to other mountpoints that is under that mountpoint.
Im combining... (1 Reply)
Discussion started by: james_falco
1 Replies
5. 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
6. Shell Programming and Scripting
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)
Discussion started by: sivaranga001
2 Replies
7. UNIX for Dummies Questions & Answers
i have this find command on my script as:
for i in `find $vdir -name "$vfile" -mtime +$pday`
the problem with this code is that the sub-directories are included on the search. how do i restrict the search to confine only on the current directory and ignore the sub-directories. please advise.... (7 Replies)
Discussion started by: wtolentino
7 Replies
8. Shell Programming and Scripting
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)
Discussion started by: vsachan
2 Replies
9. Shell Programming and Scripting
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... (2 Replies)
Discussion started by: aakishore
2 Replies
10. UNIX for Advanced & Expert Users
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)
Discussion started by: ksailesh1
7 Replies
GATHER(1) General Commands Manual GATHER(1)
NAME
gather - gather up the files in a directory for transmission
SYNOPSIS
gather [-s] source_dir [-d] dest_dir [-b] bytes [-f] file
OPTIONS
-b Desired number of bytes per output file
-d Destination directory
-f Base name of output files
-s Source directory
EXAMPLES
gather # Collect files in current dir into 60K archives
gather -d dir # Put the archives in dir
gather -b 90000 # Try to produce 90K archives
gather -s .. -d targ -b 5000
# Try to produce 5K archives
DESCRIPTION
It is often useful to collect all the files in a directory into one or more archives for transmission by mail. This program collects all
the files in the source directory (default: current directory) and puts them into a shar archive. The shar archive is then compressed and
uuencoded. An attempt is made to have the final .uue file be about the given size (default: 60K), but since gather cannot really predict
how much shar will add to the file, how much compress will reduce the file, and how much uue will add again, the sizes can fluctuate. If
the -f file flag is given, the archives will be given the names file_00.uue, file_01.uue etc. If -f is not given, the name of the source
directory is used as the base name. Since 7 characters of suffix are appended, the base name should not exceed 7 characters.
GATHER(1)