Computing.Net > Forums > Unix > Script to create a file listing

Script to create a file listing

Reply to Message Icon

Original Message
Name: Shell_Beginner
Date: December 14, 2003 at 18:06:47 Pacific
Subject: Script to create a file listing
OS: Unix
CPU/Ram: unsure
Comment:

Hi all,

I am a real beginner to shell scripting and would REALLY appreciate if anyone out there can give some suggestions
on how I can solve the following problem:

I need to create a shell script that scans through a directory (with sub-directories)
and builds a listing (in text file format) of the pathnames of all files contained within it.

If anyone could help out here with some code extracts or suggestions on which commands may be useful to get me started I'd be so grateful.

Thanks heaps in advance,

A novice!


Report Offensive Message For Removal


Response Number 1
Name: Shailesh Bhide
Date: December 15, 2003 at 00:22:10 Pacific
Subject: Script to create a file listing
Reply: (edit)

Give the following command from the base directory

find . -name "*" > outfilename.txt

outfilename.txt will contain all the recursive file listing.

Regards
Shailesh


Report Offensive Follow Up For Removal

Response Number 2
Name: Shell_Beginner
Date: December 17, 2003 at 14:14:48 Pacific
Subject: Script to create a file listing
Reply: (edit)

Thanks Shailesh,

That was a real help :-)


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Script to create a file listing

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




How often do you use Computing.Net?

Every Day
Once a Week
Once a Month
This Is My First Time!


View Results

Poll Finishes In 4 Days.
Discuss in The Lounge