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 here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
listing file with other format happyv Shell Programming and Scripting 3 06-26-2007 03:17 AM
Unix Commands to display the Filesnames kish_kk84 UNIX for Advanced & Expert Users 3 05-03-2007 02:36 AM
Extracting Filename from Fullpath njoshi UNIX for Dummies Questions & Answers 3 04-19-2007 02:34 PM
Recursive directory listing without listing files psingh UNIX for Dummies Questions & Answers 4 05-10-2002 07:52 AM
O S for new bare PC Alrichards UNIX for Dummies Questions & Answers 5 04-22-2002 06:18 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-26-2007
Registered User
 

Join Date: Jun 2006
Posts: 35
Thumbs up Listing filesnames in bare format with fullpath

Hi,
Need help. How can I get a listing of files in bare format with full path. I mean in the following format.

/root/dir1/sub-dir1/file1
/root/dir1/sub-dir1/file2
/root/dir1/sub-dir2/file1
/root/dir1/sub-dir2/file2
/root/dir2/sub-dir1/file1
/root/dir2/sub-dir2/file1
/root/dir2/sub-dir2/file2

and so on...

Please advice. Thanks in advance.

Regards,
Tipsy.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 01-26-2007
Registered User
 

Join Date: Jun 2006
Posts: 35
I guess this should work. Let me know if you have a better way to do it.

find . -type f

Regards,
Tipsy.
Reply With Quote
  #3 (permalink)  
Old 01-26-2007
Registered User
 

Join Date: Jan 2007
Posts: 366
# All files in the current directory and subdirectories
find . -type f | sed -e "s@^\.@$PWD@"
# All files in the current directory (no subdirectories)
find ./* -prune -type f | sed -e "s@^\.@$PWD@"
# All files on your system
find / -type f
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 09:13 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0