The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #8 (permalink)  
Old 04-17-2007
ennstate ennstate is offline
Registered User
 

Join Date: Mar 2007
Location: Chennai
Posts: 222
No. You didn't specify it in your request.
Quote:
To list all files in your directory and sub-directories, replace
`ls -1` by `find .`
Danny,
I dont think we may require `ls -1` in the for loop in case we are listing the files/directories in the Current working directory just an * will do.

Also note `find .` or `ls -1` or simple * will list all files & directories,so we may to have use,

Quote:
for file in $(find . -name '*' -type f -print ) ; do
#Replacement Logic
done
Please correct me if am wrong.

Thanks
Nagarajan Ganesan
Reply With Quote