[TriLUG] Slightly off topic

Ken MacKenzie ken at mack-z.com
Fri Dec 5 19:30:45 EST 2014


And I really don't like the cd in there....

On Fri, Dec 5, 2014 at 7:30 PM, Ken MacKenzie <ken at mack-z.com> wrote:

> Ok this one got pretty close:
>
> cd DirsRoot && find . -type f -print -o -name . -o -prune
>
> but I am getting a ./ leading all my file names.
>
> On Fri, Dec 5, 2014 at 7:27 PM, Ken MacKenzie <ken at mack-z.com> wrote:
>
>> I think my life might be easier instead of omitting just making the type
>> part of the search so instead of -o -type d -prune a -type f will do
>>
>> So now it is the trick about recursion and only outputting file name.  My
>> googling on the topic of an alternate to maxdepth on solaris is not leading
>> to encouraging results yet.
>>
>> Ken
>>
>> On Fri, Dec 5, 2014 at 7:25 PM, Ken MacKenzie <ken at mack-z.com> wrote:
>>
>>> Bash is not an option so I could do it in ksh, but I really want to
>>> avoid needing a script for this as that turns into an extra dependency in
>>> delivering that script as part of the program that will access the OS to do
>>> this.
>>>
>>> I could clean this up on the return to the program.  I was just hoping
>>> for something as clean as the Windoze version of this.  Yes amazingly this
>>> was easier in windoze
>>>
>>> dir /A:-D /A:-H /B searchtring
>>>
>>> Ken
>>>
>>> On Fri, Dec 5, 2014 at 7:21 PM, Igor Partola <igor at igorpartola.com>
>>> wrote:
>>>
>>>> I think your initial attempt at using find would work. Use a bash for
>>>> loop and basename to strip off the path. AFAIK, find is the most convenient
>>>> way to filter out links.
>>>>
>>>> Igor
>>>> --
>>>> This message was sent to: Ken M. <ken at mack-z.com>
>>>> To unsubscribe, send a blank message to trilug-leave at trilug.org from
>>>> that address.
>>>> TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
>>>> Unsubscribe or edit options on the web  :
>>>> http://www.trilug.org/mailman/options/trilug/ken%40mack-z.com
>>>> Welcome to TriLUG: http://trilug.org/welcome
>>>>
>>>
>>>
>>
>


More information about the TriLUG mailing list