The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > SUN Solaris
.
google unix.com



SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
list the files but exclude the files in subdirectories shyjuezy UNIX for Dummies Questions & Answers 8 10-15-2008 01:42 PM
How to list top 10 files satish_1983 UNIX for Dummies Questions & Answers 4 10-26-2007 08:05 AM
list of files bkan77 UNIX for Advanced & Expert Users 7 08-15-2007 11:09 AM
list files alisevA3 UNIX for Dummies Questions & Answers 2 03-21-2007 02:40 AM
list files avadhani UNIX for Dummies Questions & Answers 7 06-21-2005 02:25 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-04-2007
chandran.m chandran.m is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 4
Question List only the files

I want to listed out only the files from a directory which consist of both sub directories as well files in each sub directories.
i want to listed out only the files from all the subdirectories.

can anyone help me.....
  #2 (permalink)  
Old 12-04-2007
gus2000 gus2000 is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 157
It's not clear what you're asking, but maybe this will give you some ideas:

Code:
# Find only directories under (and including) $DIR
find $DIR -type d

# Find all files under $DIR (and files under all subdirs)
find $DIR -type f

# Find only directories that are in $DIR (but NOT in subdirs)
find $DIR/* -type d -prune
# or (if your "find" supports it...YMMV)
find $DIR -type d -maxdepth 1
  #3 (permalink)  
Old 12-04-2007
bobbygsk bobbygsk is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 90
Probably this could help.

ls -ltR | awk '{print $1" "$9}'
  #4 (permalink)  
Old 12-04-2007
chandran.m chandran.m is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 4
Thanks for ur reply,

one more requirement , i want to list only the files with size from all subdirectories.

Thanks in advance...
  #5 (permalink)  
Old 12-05-2007
encrypted's Avatar
encrypted encrypted is offline Forum Advisor  
Registered User
  
 

Join Date: Feb 2004
Location: Oslo, Norway
Posts: 219
How about:

find . -type f -exec du -k {} \;
  #6 (permalink)  
Old 12-06-2007
chandran.m chandran.m is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 4
This(find . -type f -exec du -k {} \ is what i was expect.

Thanks a lot....
Closed Thread

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 12:26 PM.


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