The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Find files ONLY in current directory gio001 Shell Programming and Scripting 8 06-19-2009 07:58 AM
To find files with specific dates and cp another folder. *Jess* UNIX for Dummies Questions & Answers 2 03-17-2009 08:23 PM
Recursive call to find files and directories in Shell script from current path. Ramit_Gupta Shell Programming and Scripting 2 10-07-2008 05:33 AM
Shell script to find out 2 last modified files in a folder..PLZ HELP!!!!!!!!! anju Shell Programming and Scripting 3 02-01-2008 01:47 AM
how to find files less than the current date mallikarjuna UNIX for Dummies Questions & Answers 4 01-20-2006 01:49 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 01-04-2009
Hangman2 Hangman2 is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 27
How to find files in current folder only?

How do I find files in current folder only?

We are on AIX 5.3, so maxdepth is not supported.

I tried to do this

find /dir1/dir2/dir3/dir4 -prune -type f

to display all files in /dir1/dir2/dir3/dir4 only but it does not show any files.

Somehow the -prune option works for dir3 level only.

if I try to display files in /dir1/dir2/dir3/dir4 then it does not work.

There is "-depth" option, I am copying help desc.

======================
-depth
Always evaluates to the value True. Causes the descent of the directory hierarchy to be done so that all entries
in a directory are affected before the directory itself is affected. This can be useful when the find command is
used with the cpio command to transfer files that are contained in directories without write permission.
==============

Last edited by Hangman2; 01-04-2009 at 01:10 AM..
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:36 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0