LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Is this possible to do (https://www.linuxquestions.org/questions/linux-newbie-8/is-this-possible-to-do-224458/)

jeep99899 08-30-2004 04:18 PM

Is this possible to do
 
I have directory that has several sub directories which contain files. Is there a way to print a list of the directories and the content of the sub directories in say a txt file so that i can evaluate the listing of files contained in the directories?

mugstar 08-30-2004 04:21 PM

`ls -R /name/of/directory > name-of-list-file.txt`

david_ross 08-30-2004 04:21 PM

Welcome to LQ.

You can use:
ls -laR /path/to/directory > /path/to/log.file

mugstar 08-30-2004 04:24 PM

Argh! I forgot that I have aliased `ls` to `ls -lh`... :rolleyes:

Use -l for long file listing, -a to include hidden files.

Do `man ls` for full details.


All times are GMT -5. The time now is 10:41 PM.