[ale] find command and customization

Michael Trausch mike at trausch.us
Tue Aug 2 22:50:54 EDT 2011


Add the realpath command in the mix and you'll get just that.

--
Sent from my phone... a G2 running CM7 nightlies!
On Aug 2, 2011 10:49 PM, "Narahari &apos;n&apos; Savitha" <
savithari at gmail.com> wrote:
> If I use find . t hen I wont get the full path in the output it provides.
>
> If I do a find in the home folder.
>
> If I do find . -name a.txt -print I see
> ./a/b/c/d/a.txt
> If I do f $(pwd) -name a.txt -print
> /home/coolguy/a/b/c/d/a.txt
>
> See that /home/coolguy, it is important. for me.
>
> -Narahari
> On Mon, Aug 1, 2011 at 8:44 AM, John Pilman <jcpilman at gmail.com> wrote:
>
>> Oops, I left out the maxdepth specification:
>>
>> alias f='find . -maxdepth 1 -type f -name'
>>
>> On Mon, Aug 1, 2011 at 8:43 AM, John Pilman <jcpilman at gmail.com> wrote:
>> > I usually avoid re-writing the common commands. Instead I pick a
>> > similar name. In this case it would be 'f'.
>> >
>> > alias f='find . -maxdepth -type f -name'
>> >
>> > now
>> > f "whatever"
>> > will only search the pwd. This may not be exactly what you need, but
>> > maybe it gets you a step closer.
>> >
>> > ...John
>> >
>> > On Sun, Jul 31, 2011 at 11:52 PM, David Tomaschik
>> > <david at systemoverlord.com> wrote:
>> >> On 07/31/2011 10:18 PM, Narahari 'n' Savitha wrote:
>> >>> Friends:
>> >>>
>> >>> I use find command a lot these days and each time I have to type find
>> >>> $(pwd) -name "whatever" -print
>> >>>
>> >>> I want to just type find . -name "whatever" -print and it should do
>> >>> find $(pwd). Any idea how to overwrite the find function.
>> >>>
>> >>> -Narahari
>> >>>
>> >>
>> >> Why aren't you doing find . -name "whatever"? find . and find $(pwd)
>> >> are equivalent, as . means the current working directory.
>> >>
>> >> David
>> >> _______________________________________________
>> >> 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
>> >>
>> >
>>
>> _______________________________________________
>> 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
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.ale.org/pipermail/ale/attachments/20110802/cbab23dc/attachment.html 


More information about the Ale mailing list