[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Newbie] Can ls command format output my way?



Richard Owlett <rowlett@cloud85.net> writes:

> ls -R /media/data produces the content but not the NEEDED format.
>
> I want a list like:
> /media/data/dir1/filea
> /media/data/dir1/fileb
> /media/data/dir1/subdir1/filex
> /media/data/dir1/subdir1/filey
> /media/data/dir1/subdir1/filez
> /media/data/dir2/filea
> /media/data/dir2/fileb
> /media/data/dir2/subdir1/filex
> /media/data/dir2/subdir1/filey
> /media/data/dir2/subdir1/filez
> et cetera
>
> I don't wish anything but full path to all files in a top level
> directory.
>

find /media/data -type f

> Followup question how should I found the answer for myself. I looks
> basic enough ...
> TIA

I don't recall now when I first learnt about the find command.  Now I
use it all the time.  The Unix Power Tools book
(http://shop.oreilly.com/product/9780596003302.do) has a chapter on the
find command.  If you have access to an O'Reilly Safari account, you
could browse through it.

-- 
regards,
kushal


Reply to: