[ale] windoze scripts to linux scripts
Jim Kinney
jim.kinney at gmail.com
Fri May 27 12:14:35 EDT 2011
I have always wondered why ls lacks a show_full_path flag. It has nearly
everything else.
On Fri, May 27, 2011 at 11:39 AM, arxaaron <arxaaron at gmail.com> wrote:
> On 2011/05/26, at 16:16 , Geoffrey Myers wrote:
>
> > The Don Lachlan wrote:
> >> On Wed, May 25, 2011 at 05:55:43PM -0400, arxaaron wrote:
> >>> On 2011/05/25, at 15:54 , Narahari 'n' Savitha wrote:
> >>>> 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.
> >>> The standard output of the find command IS the full
> >>> path name (starting at the root /)
> >>> On this machine, doing a find of type file on my
> >>> home directory:
> >>>
> >>> find ~ -type f
> >>> yeilds:
> >>> /Users/arx/Sites/images/apache_pb.gif
> >>
> >> Aaron,
> >>
> >> That's because ~ expands to /Users/arx/ - "find -print" returns the
> >> path
> >> relative to whatever directory was specified. If you specify a local
> >> directory, it prints a local directory.
> >>
> >> So you may solve his problem but it does not start at the root /.
> >
> > find $(pwd) -print
>
> I got hung up on this challenge and found that solution
> in my searches as well. Of course, the requisite for making
> that work is to cd into the target directory before listing
> it.
>
> Anyway, inside a script one should probably be specifying
> the full path to files/dirs (or cd to a known home base starting
> point) in order to avoid any ambiguity from relative run time
> environments.
>
> I still didn't find any single command or option combination
> for [find | ls | {etc}] that would list any arbitrary file with its
> full path. A trivial issue to address, but it's interesting that
> it doesn't seem to be in the standard tool chest. Wonder
> if having such would present a security issue?
>
> peace
> aaron
>
>
>
>
>
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>
--
--
James P. Kinney III
As long as the general population is passive, apathetic, diverted to
consumerism or hatred of the vulnerable, then the powerful can do as they
please, and those who survive will be left to contemplate the outcome.
- *2011 Noam Chomsky*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.ale.org/pipermail/ale/attachments/20110527/c2a64234/attachment.html
More information about the Ale
mailing list