[ubuntu-in] Scripts

Narendra Diwate narendra.diwate at gmail.com
Mon Sep 6 12:23:03 BST 2010


@Brijith and @Ritesh

Thanks a ton. Worked

On 9/6/10, Ritesh Sinha <ritesh.kumar.sinha at gmail.com> wrote:
> On Mon, Sep 6, 2010 at 1:50 PM, Narendra Diwate
> <narendra.diwate at gmail.com> wrote:
>> Hi
>>
>> I need to generate a text file containing the file names with or
>> without full path for a bunch of files in a folder or partition.
>> Something like a playlist but not necessarily for music files. I think
>> that this is easy from the terninal. Can someone point me or give me
>> the terminal commands.
>
> This should work
>
> $ find * -type f | sed "s/^.*\///" >> mylist.txt
>
> It will remove the leading path.
>
> If you want the path just remove the sed i.e.
>
> $ find * -type f >> mylistwithpath.txt
>
>>
>> --
>> Regards
>>
>> Narendra Diwate
>>
>> --
>> ubuntu-in mailing list
>> ubuntu-in at lists.ubuntu.com
>> https://lists.ubuntu.com/mailman/listinfo/ubuntu-in
>>
>
> --
> ubuntu-in mailing list
> ubuntu-in at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-in
>


-- 
Regards

Narendra Diwate



More information about the ubuntu-in mailing list