Google Answers Logo
View Question
 
Q: Need help with Linux command ( No Answer,   2 Comments )
Question  
Subject: Need help with Linux command
Category: Computers > Operating Systems
Asked by: respree-ga
List Price: $5.00
Posted: 24 Oct 2002 20:53 PDT
Expires: 24 Oct 2002 21:31 PDT
Question ID: 89498
Greetings Linux Gurus:

I need to create a text (.txt) file of all the filenames within a
certain directory.  The problem is that this directory has close to
100,000 files in it.

When I try:  ls *.* > filename.txt

I get the error message "Argument List Too Long," resulting from the
huge number of files in this directory.

I am running the latest version of Debian.

Is there a "non-radical" solution to my problem?

Would appreciate any advice, or better yet, the actual command to do
this (if it can be done).
Answer  
There is no answer at this time.

Comments  
Subject: Re: Need help with Linux command
From: davidmaymudes-ga on 24 Oct 2002 20:55 PDT
 
did you try just "ls > filename.txt"?

ls with no arguments should list all the files in the directory,
presuming you didn't only want ones with dots in their names.
Subject: Re: Need help with Linux command
From: respree-ga on 24 Oct 2002 21:31 PDT
 
Yes, that worked just fine.  The *.* was to indicate all files.  Thanks very much.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy