[ale] windoze scripts to linux scripts

JD jdp at algoloma.com
Wed May 25 16:14:08 EDT 2011


On 05/25/2011 03:54 PM, Narahari 'n' Savitha wrote:
> Friends:
> 
> I have bat files in windoze that I am trying to converts to linux (its
> dejavu, in 1999 I was finding equivalents of sh in windoze)
> 
> What I am looking for is
> 
> In Windoze, I can do dir /s /b c:\bin and it will list all files with
> full path names
> 
> c:\bin\putty.exe
> c:\bin\putty.cfg
> .....
> ....
> 
> How do I do that Linux world ?  I know you will tell me do find ~/bin
> -name "META-INF" -print
> 
> but what I want is the full name of the file including the path.
> 
> Any ideas ?
> 

$ find /bin -type f -print

No need to specify a filename. You can use regex in the name, if you'd
like to limit returned files to a pattern.  If you only want
directories, use -type d.  The man page for 'find' really is pretty great.

If you want the full path, then always specify the starting dir from /.

$ find /home/jd/bin -type f



More information about the Ale mailing list