Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Listing (ls) question 1

Status
Not open for further replies.

teser

Technical User
Mar 6, 2001
194
US
I can do a count of files in a directory (including subdirectories) such as:
find . -name '*.html' -print | wc -l

How would I list each file (all files with *.html extensions) in the directory (including all the subdirectories)?
 
You would use

find . -name '*.html' -exec ls -l {} \;

Greg.
 
Thanks Greg for quick response.
Is there a way to make the listing show 3 columns?? I have 2700 files and want to save paper.

 
Is there anyway to do wildcard listing of files
in FTP ? I would like to list files with only
certain extension.

Thnks
Loc Long
 
Have you even tried? To list files with .html extension within ftp, do ls *.html

Greg.
 
I can't check to make sure at the moment, but I think the following command should provide you with the three files per line you require:
Code:
find . -name "*.html" -print | xargs -n3 echo
Hope this helps :cool: Cheers, NEIL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top