"ls" (at least the implementations that I know of) use fts_open, fts_read ... to traverse a file hierarchy. These are "non-recursive" methods which maintain a list of the visited directories internally.
Use "man fts_read" or http://linux.die.net/man/3/fts_read to get more information about these functions.
Answer from Martin R on Stack OverflowVideos
using the LS -R command effectively - how to set the output to list all the data simply
see what i have now:
`./Luca_V: 00_data_1.pdf 1_data_2.pdf 1_data_3.pdf data_4.pdf data_5.pdf data_6.pdf data_7_.pdf data_8_.pdf data_9.pdf __data_10.pdf
./David_V: 00_data_1.pdf 1_data_2.pdf 1_data_3.pdf data_4.pdf data_5.pdf data_6.pdf data_7.pdf data_8_.pdf data_9.pdf __data_10.pdf
`
i want to have the data put so that all the files are listed in a simple list view:
"ls" (at least the implementations that I know of) use fts_open, fts_read ... to traverse a file hierarchy. These are "non-recursive" methods which maintain a list of the visited directories internally.
Use "man fts_read" or http://linux.die.net/man/3/fts_read to get more information about these functions.
Just for completeness, ls is part of GNU coreutils: www.gnu.org/software/coreutils/.
I have been told to make a few directories and text files and see the results using ls -lR . Does anyone know what this command mean or does? I can't seem to find the answer anywhere
Yes, the formatting of the output is the only difference between ls -1 and ls without any options.
From the ls manual on my system:
-1 (The numeric digit "one".) Force output to be one entry per line.
This is the default when output is not to a terminal.
This is also a POSIX option to the ls utility.
The manual for ls on your system is bound to say something similar (see man ls).
Related:
- is piped ls the same as ls -1?
ls -1 lists one file per line. By default, when itโs outputting to a terminal, ls lists files in columns, whose number varies depending on the length of the file names and the available space on screen.
To find this kind of information, man ls works better than ls --help. (This is true for most commands.)