Re: [Wlug] list filenames within directory > output to text file?
You can also try: ls | sort > /home/EJ/Directory/CurrentList.txt
________________________________ From: "wlug-request@mail.wlug.org" <wlug-request@mail.wlug.org> To: wlug@mail.wlug.org Sent: Wednesday, May 9, 2012 12:00 PM Subject: Wlug Digest, Vol 103, Issue 3
----- Forwarded Message -----
Send Wlug mailing list submissions to wlug@mail.wlug.org
To subscribe or unsubscribe via the World Wide Web, visit http://mail.wlug.org/mailman/listinfo/wlug or, via email, send a message with subject or body 'help' to wlug-request@mail.wlug.org
You can reach the person managing the list at wlug-owner@mail.wlug.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of Wlug digest..."
Today's Topics:
1. Re: list filenames within directory > output to text file? SOLVED (E Johnson) 2. Re: list filenames within directory > output to text file? SOLVED (Theo Van Dinter) 3. Re: list filenames within directory > output to text file? (kevin.paetzold) 4. Re: list filenames within directory > output to text file? SOLVED (E Johnson) 5. Re: list filenames within directory > output to text file? SOLVED (Theo Van Dinter) 6. Re: list filenames within directory > output to text file? SOLVED (E Johnson) Wow! Perfect! Thanks to everyone!
I used:
(in the directory I need output from)
ls -1 > /home/EJ/Directory/CurrentList.txt
That text should now drop into an XL doc or something, from where we can print it.
Beautiful. Thanks guys!
Liz
On 8 May 2012 17:52, E Johnson <iris.gates@gmail.com> 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
Even better, you don't need the "-1". ls determines if it's output is going to a tty and auto-enables the "-1" mode when it's not, such as when you're writing to a file. :)
I have to ask though, why would you put the list of files in a spreadsheet just to print it? Seems like something you could do via the machine itself (if printing is configured), or worst case you just print the text file.
On Tue, May 8, 2012 at 6:22 PM, E Johnson <iris.gates@gmail.com> wrote:
Wow! Perfect! Thanks to everyone!
I used:
(in the directory I need output from)
ls -1 > /home/EJ/Directory/CurrentList.txt
That text should now drop into an XL doc or something, from where we can print it.
Beautiful. Thanks guys!
Liz
On 8 May 2012 17:52, E Johnson <iris.gates@gmail.com> 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
i would do something like: tree -f -i dirname > dirlist.txt
A text file containing 500 names would print on just the left-hand side of who-knows how many pages. We need this in a word processor doc, which we can make into columns, then print on only 2 or 3 sheets. It's just for reference, so we know if we already have this file in our directory.
Or, I need a command which will print the filenames in several columns (six, I think, with reasonlable space in between columns) on a series of landscape-oriented pages. I probably need to define the font. I think we used 8pt arial last time, which came out on one page. Now we have 3x as many files in the directory but still need a printout for reference.
Liz
On 8 May 2012 18:27, Theo Van Dinter <felicity@kluge.net> wrote:
Even better, you don't need the "-1". ls determines if it's output is going to a tty and auto-enables the "-1" mode when it's not, such as when you're writing to a file. :)
I have to ask though, why would you put the list of files in a spreadsheet just to print it? Seems like something you could do via the machine itself (if printing is configured), or worst case you just print the text file.
On Tue, May 8, 2012 at 6:22 PM, E Johnson <iris.gates@gmail.com> wrote:
Wow! Perfect! Thanks to everyone!
I used:
(in the directory I need output from)
ls -1 > /home/EJ/Directory/CurrentList.txt
That text should now drop into an XL doc or something, from where we can print it.
Beautiful. Thanks guys!
Liz
On 8 May 2012 17:52, E Johnson <iris.gates@gmail.com> 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
On Tue, May 8, 2012 at 7:59 PM, E Johnson <iris.gates@gmail.com> wrote:
A text file containing 500 names would print on just the left-hand
side of who-knows how many pages. We need this in a word processor doc, which we can make into columns, then print on only 2 or 3 sheets. It's just for reference, so we know if we already have this file in our directory.
So you want something similar to the terminal ls output, ie: filenames in columns? You can do something like "ls | pr -6tT" which will generate a 6 column output w/ the filenames. You can further tweak pr with other options.
OK. That produced an output such as:
005p080_081 038p332_333 040p392_393 100p112_113 405p074_075 414p230_231 005p082_083 038p372_373 040p414_415 1044p39v_14 405p092_093 414p338_339 005p094_095 038p378_379 040p450_451 1052p211v_2 405p196_197 414p428_429 005p118_119 038p400_401 040p472_473 105p076_076 405p232_233 414p467_468 005p124_125 038p426_427 040p482_483 106p396_397 405p250_251 416p064_065 005p126_127 038p438_439 041p010_011 107p504_505 405p322_323 416p174_175 005p150_151 038p590_591 041p068_069 107p512_513 405p328_329 416p198_199 416p212_213 424p174_175 433p248_249 457p314_315 504p204_205 762Ap254_25 416p294_295 425p006_007 434p216_217 459p068_069 661Ap032_03 762Ap266_26 417p052_053 426p034_035 434p256_257 459p164_165 661p028_029 762p130_131
it printed to terminal.
The ls command with redirect into text file did work though! All it needed then was to copy/paste into word processor, then format into colums, select font & type size. We got 500 filenames on 2 pages horizontal.
That's our checklist --it's done. Looks good. We're happy.
Thanks again, Liz
On 8 May 2012 20:18, Theo Van Dinter <felicity@kluge.net> wrote:
On Tue, May 8, 2012 at 7:59 PM, E Johnson <iris.gates@gmail.com> wrote:
A text file containing 500 names would print on just the left-hand side of who-knows how many pages. We need this in a word processor doc, which we can make into columns, then print on only 2 or 3 sheets. It's just for reference, so we know if we already have this file in our directory.
So you want something similar to the terminal ls output, ie: filenames in columns? You can do something like "ls | pr -6tT" which will generate a 6 column output w/ the filenames. You can further tweak pr with other options.
_______________________________________________ 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
I know this issue is solved/dead/buried, but there were a couple responses (below) that should be clarified. I was told in the past that ls stands for "list sorted", a statement I can't confirm from the usual internet fact check sites. In any case, it is specifically designed to (alphabetically) sort output, no need to invoke any other sorts. On Wed, May 9, 2012 at 7:08 PM, Aljerin Butler,Jr. <albutlerjr@yahoo.com> wrote:
You can also try: ls | sort > /home/EJ/Directory/CurrentList.txt
On Tue, May 8, 2012 at 6:12 PM, Jason Couture <plaguethenet@gmail.com> wrote:
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 <soupforare@gmail.com> wrote:
Why not just 'ls > filelist.lst'?
Yes, the ls command did deliver me a list of files in the directory, sorted by filename. I was working from within the directory when I issued the command but it probably doesn't matter. Liz J On 9 May 2012 20:41, E Johnson <iris.gates@gmail.com> wrote:
That worked. Thanks, Liz
On 9 May 2012 19:08, Aljerin Butler,Jr. <albutlerjr@yahoo.com> wrote:
You can also try: ls | sort > /home/EJ/Directory/CurrentList.txt
participants (3)
-
Aljerin Butler,Jr.
-
Brett Russ
-
E Johnson