Re: Cygwin/Unix command - would like to export directory listing into txt file
- From: "Lara" <rachellara1979@xxxxxxxxx>
- Date: 3 Jan 2007 09:16:26 -0800
Thanks Ed! I was actually opening up the actual txt file in Windows.
I just tried your suggestion, "cat theFiles.txt" and the new
lines/spaces are there! :D
Ed Morton wrote:
Lara wrote:
[please don't top-post]
It's fine for now! When opening the file in Excel, it automatically
put each listed file separately on a new line/row, so I can work with
this for now. :)
Thanks,
Lara
Lara wrote:
Hi again,
Alrighty, I just tried ls > theFiles.txt and it worked, however, there
is no space between the file names. Is there anyway to add a space, or
will it always produce output like this?
Thanks again in advance,
Lara
Lara wrote:
Hi all,
I'm quite new to Unix and am actually only using Cygwin on XP to get
the hang of things first, while also using it to practice compiling C
programs.
Now, I need a list of a directory's contents (containing a mix of .jpg
and .txt files, not that this would make a difference I assume!) and am
trying to figure out how to do it. :( All I've discovered is "ls"
(this is fine and shows everything), and "print" which actually doesn't
do too much for me except sit there spooling in my system tray (I tried
"print theFiles" and "print theFiles.txt"). "lpr" also doesn't do much
for me. Please note I have no printer attached and I would like to
transfer the text file's contents to a database, so I need it in txt
format if possible please.
Thanks in advance and sorry for the basic question,
Lara
Thank you for posting this riveting study of 8 minutes of your life... ;-).
I do wonder which command you used to view the contents of
"theFiles.txt" since apparently that command is neglecting to display
the newline characters used by "ls" between the file names. I suspect it
was some Windows thingy that, unlike UNIX tools, expects control-Ms
after each newline. Try the UNIX/cygwin command "cat theFiles.txt" and
you should see those "spaces".
Ed.
.
- References:
- Cygwin/Unix command - would like to export directory listing into txt file
- From: Lara
- Re: Cygwin/Unix command - would like to export directory listing into txt file
- From: Lara
- Re: Cygwin/Unix command - would like to export directory listing into txt file
- From: Lara
- Re: Cygwin/Unix command - would like to export directory listing into txt file
- From: Ed Morton
- Cygwin/Unix command - would like to export directory listing into txt file
- Prev by Date: Re: How to make my terminal support color output?
- Next by Date: Re: Cygwin/Unix command - would like to export directory listing into txt file
- Previous by thread: Re: Cygwin/Unix command - would like to export directory listing into txt file
- Next by thread: Re: Cygwin/Unix command - would like to export directory listing into txt file
- Index(es):
Relevant Pages
|