list filenames within directory > output to text file?
Is there an app or command line tool which can copy all filenames within a certain directory, and output these filenames to a plain-text file? I need to list about 400 filenames, then drop these into an xl doc, in order to sort. Don't need to know permissions or anything else. I think sort might do it < http://ss64.com/bash/sort.html >, but probably I need help creating a command that will list only the file names, which I can then copy/paste to an xl doc. I am running Debian. I have one Squeeze and one Lenny here. Thanks extremely, Liz J
Do you need just the current directory? or do you need to walk
subdirectories as well?
This e-mail transmission, including any attachments, is intended only
for the named recipient(s) and may contain information that is
privileged, confidential and/or exempt from disclosure under
applicable law. If you have received this transmission in error, or
are not the named recipient(s), please notify the sender immediately
by return e-mail and permanently delete this transmission, including
any attachments.
On Tue, May 8, 2012 at 5:52 PM, E Johnson
Is there an app or command line tool which can copy all filenames within a certain directory, and output these filenames to a plain-text file?
I need to list about 400 filenames, then drop these into an xl doc, in order to sort.
Don't need to know permissions or anything else.
I think sort might do it < http://ss64.com/bash/sort.html >, but probably I need help creating a command that will list only the file names, which I can then copy/paste to an xl doc.
I am running Debian. I have one Squeeze and one Lenny here.
Thanks extremely, Liz J _______________________________________________ Wlug mailing list Wlug@mail.wlug.org http://mail.wlug.org/mailman/listinfo/wlug
Wow you guys are great.
I need only the filesnames in a specific directory This has no
subdirectories, only about 400-500 files, all the same kind (pdf's)
Liz
On 8 May 2012 17:54, Jason Couture
Do you need just the current directory? or do you need to walk subdirectories as well?
This e-mail transmission, including any attachments, is intended only for the named recipient(s) and may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you have received this transmission in error, or are not the named recipient(s), please notify the sender immediately by return e-mail and permanently delete this transmission, including any attachments.
On Tue, May 8, 2012 at 5:52 PM, E Johnson
wrote: Is there an app or command line tool which can copy all filenames within a certain directory, and output these filenames to a plain-text file?
I need to list about 400 filenames, then drop these into an xl doc, in order to sort.
Don't need to know permissions or anything else.
I think sort might do it < http://ss64.com/bash/sort.html >, but probably I need help creating a command that will list only the file names, which I can then copy/paste to an xl doc.
I am running Debian. I have one Squeeze and one Lenny here.
Thanks extremely, Liz J _______________________________________________ Wlug mailing list Wlug@mail.wlug.org http://mail.wlug.org/mailman/listinfo/wlug
Wlug mailing list Wlug@mail.wlug.org http://mail.wlug.org/mailman/listinfo/wlug
Run this in that directory, should work on any linux distro with bash and grep.
find -maxdepth 1 -type f -exec basename {} \; | sort | grep -v
"filelist.txt" > filelist.txt
This e-mail transmission, including any attachments, is intended only
for the named recipient(s) and may contain information that is
privileged, confidential and/or exempt from disclosure under
applicable law. If you have received this transmission in error, or
are not the named recipient(s), please notify the sender immediately
by return e-mail and permanently delete this transmission, including
any attachments.
On Tue, May 8, 2012 at 6:08 PM, E Johnson
Wow you guys are great.
I need only the filesnames in a specific directory This has no subdirectories, only about 400-500 files, all the same kind (pdf's)
Liz
On 8 May 2012 17:54, Jason Couture
wrote: Do you need just the current directory? or do you need to walk subdirectories as well?
This e-mail transmission, including any attachments, is intended only for the named recipient(s) and may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you have received this transmission in error, or are not the named recipient(s), please notify the sender immediately by return e-mail and permanently delete this transmission, including any attachments.
On Tue, May 8, 2012 at 5:52 PM, E Johnson
wrote: Is there an app or command line tool which can copy all filenames within a certain directory, and output these filenames to a plain-text file?
I need to list about 400 filenames, then drop these into an xl doc, in order to sort.
Don't need to know permissions or anything else.
I think sort might do it < http://ss64.com/bash/sort.html >, but probably I need help creating a command that will list only the file names, which I can then copy/paste to an xl doc.
I am running Debian. I have one Squeeze and one Lenny here.
Thanks extremely, Liz J _______________________________________________ Wlug mailing list Wlug@mail.wlug.org http://mail.wlug.org/mailman/listinfo/wlug
Wlug mailing list Wlug@mail.wlug.org http://mail.wlug.org/mailman/listinfo/wlug
Wlug mailing list Wlug@mail.wlug.org http://mail.wlug.org/mailman/listinfo/wlug
will create a file. >> will append to it. ls will do and -a if you need the hidden files. So ls > filename.txt.
On Tue, May 8, 2012 at 5:52 PM, E Johnson
Is there an app or command line tool which can copy all filenames within a certain directory, and output these filenames to a plain-text file?
I need to list about 400 filenames, then drop these into an xl doc, in order to sort.
Don't need to know permissions or anything else.
I think sort might do it < http://ss64.com/bash/sort.html >, but probably I need help creating a command that will list only the file names, which I can then copy/paste to an xl doc.
I am running Debian. I have one Squeeze and one Lenny here.
Thanks extremely, Liz J _______________________________________________ Wlug mailing list Wlug@mail.wlug.org http://mail.wlug.org/mailman/listinfo/wlug
# Find all files in the current directory and sub-directories, sort
them by name, and remove the leading ./ in their path. write filenames
to filelist.txt
find -type f | sort | cut -b 3- > filelist.txt
# Find all files in the current directoy only, sort by name, remove
leading ./ write filenames to filelist.txt
find -maxdepth 1 -type f -exec basename {} \; | sort > filelist.txt
On Tue, May 8, 2012 at 5:52 PM, E Johnson
Is there an app or command line tool which can copy all filenames within a certain directory, and output these filenames to a plain-text file?
I need to list about 400 filenames, then drop these into an xl doc, in order to sort.
Don't need to know permissions or anything else.
I think sort might do it < http://ss64.com/bash/sort.html >, but probably I need help creating a command that will list only the file names, which I can then copy/paste to an xl doc.
I am running Debian. I have one Squeeze and one Lenny here.
Thanks extremely, Liz J _______________________________________________ Wlug mailing list Wlug@mail.wlug.org http://mail.wlug.org/mailman/listinfo/wlug
Why not just 'ls > filelist.lst'? On 5/8/2012 17:52, E Johnson wrote:
Is there an app or command line tool which can copy all filenames within a certain directory, and output these filenames to a plain-text file?
She said she wanted a sorted list, and the above commands will work
even if she creates subdirectories in the future.
On Tue, May 8, 2012 at 6:10 PM, soup
Why not just 'ls > filelist.lst'?
On 5/8/2012 17:52, E Johnson wrote:
Is there an app or command line tool which can copy all filenames within a certain directory, and output these filenames to a plain-text file?
_______________________________________________ Wlug mailing list Wlug@mail.wlug.org http://mail.wlug.org/mailman/listinfo/wlug
participants (4)
-
E Johnson
-
Jason Couture
-
John Platt
-
soup