[ubuntu-in] Scripts
Ritesh Sinha
ritesh.kumar.sinha at gmail.com
Mon Sep 6 10:00:56 BST 2010
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
>
More information about the ubuntu-in
mailing list