"file1 file2..." isn't an option... It was an example of manually entering each file and subfolder at the command line.
Given a directory structure:
Code:
topDir
subDir1
file1
subDir2
file 2
subSubDir1
file3
I know that looks like crap.
Just running `ls` with no flags would be the same as running `ls .` -- Since `ls` only lists the contents of the directory passed on the command line you get the contents of topDir:
If you wanted to see the contents of subDir1 you'd need to either `cd` into subDir1 or provide `ls` with subDir1 as the folder to use:
If you wanted to see the contents of both subDir1 AND subDir2 you can pass both:
Code:
# ls subDir1 subDir2
subDir1:
file1
subDir2:
file2
subSubDir1
Because of bash command line expansion, the * (wildcard) will be expanded to the full list of files in topDir:
Code:
# ls *
subDir1:
file1
subDir2:
file2
subSubDir1
If you wanted to see everything in the entire directory tree, you'd need to use the recursive flag (-R):
Code:
# ls -R
subDir1:
file1
subDir2:
file2
subSubDir1
subDir2/subSubDir1
file3
Hopefully this helps clear things up.